#!/bin/sh

# TomatoUSB's lib directory is read-only, I can't copy libcurl.so to it.
# So I add . to LD_LIBRARY_PATH and export it, then sub shell can use 
# curl directly.
# Static linking of curl itself is diffcult. 
LD_LIBRARY_PATH=.:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH

# first send 'login'
sh curl_login.sh

# the first time, wait 55 minutes then send 'addtime'
sleep 3311 # 3311 is get from a captured packet
sh curl_addtime.sh

# other, wait one hour then send 'addtime
while [ TRUE ];do
	sleep 3600 
	sh curl_addtime.sh
done
